//
//  WBNetworkManager.h
//  TransWB
//
//  Created by 孝飞王 on 2016/12/30.
//  Copyright © 2016年 孝飞王. All rights reserved.
//

#import <AFNetworking/AFNetworking.h>
#import "WBUserModel.h"
typedef NS_ENUM(NSInteger,WBHTTPMethod ) {
    GET = 0,
    POST
};


@interface WBNetworkManager : AFHTTPSessionManager

@property (nonatomic,strong)WBUserModel*userAccount;


@property (nonatomic,assign)    BOOL isLogin;//是否登录

/**
 创建 单利对象
 
 */
+ (instancetype)shareManager;


/**
 用一种方法封装Get Post 请求

 @param method Get or Post
 @param urlString url  连接
 @param parameters 参数
 @param completion 请求回来的回调
 */
- (void)requestHTTPMethod:(WBHTTPMethod)method urlString:(NSString*)urlString parameters:(NSDictionary*)parameters completion:(void(^)(id responseObject, BOOL isSuccess))completion;


/**
    单独处理token 字典 的封装方法

 @param method <#method description#>
 @param urlString <#urlString description#>
 @param parameters <#parameters description#>
 @param completion <#completion description#>
 */
- (void)tokenRequestHttpMethod:(WBHTTPMethod)method urlString:(NSString*)urlString parameters:(NSDictionary*)parameters completion:(void(^)(id responseObject, BOOL isSuccess))completion;
@end
